<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文字聚光灯</title>
    <style>
        html,body{
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: #222;
            overflow: hidden;
        }
       .light{
           position: relative;
           font-size: 10em;
           color:#333;
           letter-spacing: -0.1rem;
       }
       .light::before{
           position: absolute;
           content: 'Hello World!';
           color: yellow;
           left: 0;
           top: 0;
           color: transparent;
           clip-path: circle(10% at 50% 50%);
           background-image: linear-gradient(45deg,red,blue,green,yellow,white,pink);
           -webkit-background-clip:text;
           animation: animation 7s ease-in-out 0s infinite ;
           
       }
       @keyframes animation{
           0%{
            clip-path: circle(20% at 0% 50%);
           }
           50%{
            clip-path: circle(20% at 100% 50%);
           }
           100%{
            clip-path: circle(20% at 0% 50%);
           }
       }
    </style>
</head>
<body>
<div class="light">
    Hello World!
</div>
</body>
</html>